package cn.lger.pojo;

import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.lang.NonNull;
import springfox.documentation.annotations.ApiIgnore;

/**
 * 用户实体
 *
 * @author Pro
 * @date 2018-06-13.
 */
@ApiModel(description = "用户实体")
public class User {
    @ApiModelProperty(value = "用户id")
    private int id;
    @NonNull
    @ApiModelProperty(value = "用户名", required = true)
    private String username;
    @NonNull
    @ApiModelProperty(value = "密码，返回数据不显示", required = true)
    @JsonIgnore
    private String password;
    @ApiModelProperty(value = "邮箱")
    @NonNull
    private String email;

    @ApiIgnore
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", email='" + email + '\'' +
                '}';
    }
}
